<template>
  <div class="category">
    <h3 class="text">{{ title }}</h3>
    <slot name="center">我是默认值，如果上层组件没有给我传递值，我就会出现</slot>
    <slot name="footer">我是默认值，如果上层组件没有给我传递值，我就会出现</slot>
  </div>
</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Category",
  props: {
    data: {
      required: true,
      type: Array
    },
    title: {
      required: true,
      type: String
    }
  },
}
</script>

<style scoped>
.category {
  background: skyblue;
  width: 200px;
  height: 300px;
}

.text {
  text-align: center;
  background: orange;
}
</style>
